﻿// Project: WebPage, File: WebPage.cs
// Namespace: WebPage, Class: TextWebPage
// Path: K:\Secure Project\WebPage\WebPage, Author: Radu-Mihail
// Code lines: 114, Size of file: 3.43 KB
// Creation date: 12/7/2008 6:03 PM
// Last modified: 12/24/2008 3:26 PM

#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using WebPage.Client;
#endregion


namespace WebPage
{
    /// <summary>
    /// Web page
    /// </summary>
    public class TextWebPage:AbstractWebPage
    {
        #region Private fields
                
        /// <summary>
        /// _page content
        /// </summary>
        private string _pageContent;
                
        #endregion  

        #region Properties


        public override List<string> LinkList
        {
            get { return null; }
        }
 

     
        #endregion
        #region Overriden methods
        public override object GetPageContent()
        {
            return _pageContent;
        }
        #endregion
        #region Constructor
        /// <summary>
        /// Create text web page
        /// </summary>
        /// <param name="downloadClient">Download client</param>
        public TextWebPage(ref MyWebClient downloadClient, bool revisit):base(ref downloadClient, revisit)
        {   
            try
            {
                _pageContent = Encoding.ASCII.GetString(_fileContent);               
            } // try
            catch (Exception)
            {
                throw new Exception("Exceptie");
            } // catch (exc)
            // Else just download the page content

        } // TextWebPage(downloadClient)
        #endregion
    } // class TextWebPage
} // namespace WebPage
